package com.example.morton;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;

import com.example.customView.CustomClickView1Activity;
import com.example.customView.CustomViewActivity;
import com.example.fragmentTab.TabFragmentActivity;
import com.example.fragmentTab.TabViewPagerActivity;
import com.example.viewpageindicator.R;

import butterknife.ButterKnife;
import butterknife.OnClick;

public class TabListButtonActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_tab_list_buttonb);

        ButterKnife.bind(this);
    }

    @OnClick({R.id.btn_tab_fragment, R.id.btn_tab_view_pager, R.id.btn_custom_view,
            R.id.btn_custom_view_1})
    public void onClick(View view) {
        int id = view.getId();
        Intent intent = null;
        switch (id) {
            case R.id.btn_tab_fragment:
                intent = new Intent(TabListButtonActivity.this, TabFragmentActivity.class);
                break;
            case R.id.btn_tab_view_pager:
                intent = new Intent(TabListButtonActivity.this, TabViewPagerActivity.class);
                break;
            case R.id.btn_custom_view:
                intent = new Intent(TabListButtonActivity.this, CustomViewActivity.class);
                break;
            case R.id.btn_custom_view_1:
                intent = new Intent(TabListButtonActivity.this, CustomClickView1Activity.class);
                break;
            default:
                break;
        }

        startActivity(intent);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        ButterKnife.unbind(this);
    }
}
